import Koa from 'koa';
import bodyParser from 'koa-body';
import { initProject } from './config/index';
const app: Koa = new Koa();
initProject(app);

app.use(bodyParser());
app.use((ctx: Koa.DefaultContext) => {
  console.log('hello world');
  ctx.body = 'hello world！';
});

const port: number = 3000;
app.listen(port, () => {
  console.log(`seccess start server`);
  console.log(`local: http://127.0.0.1:${port}`);
});
